package com.zhida.jiyangcenter.api

import chooongg.base.manager.app
import chooongg.http.HttpManager
import com.vehicle.inspection.api.BaseTokenInterceptor
import com.zhida.jiyangcenter.utils.SP
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

interface APIHealth {
    companion object {
        fun service() =
            HttpManager.create(app.applicationContext, "http://beauty.hebzd.com/api/health/") {
                addConverterFactory(GsonConverterFactory.create())
                addInterceptor("health", BaseTokenInterceptor())

            }.getAPI(APIHealth::class.java)
    }

    /**
     *判断是否填写电子档案  智能测试  体检报告
     */
    @POST("document/test/examination")
    suspend fun documentTestExamination(): NetResponse<DocumentTestExaminationEntity>

    /**
     *健康管理方案添加
     */
    @POST("management/add")
    suspend fun managementAdd(): NetResponse<Any>

    /**
     *健康管理列表
     */
    @POST("management/list")
    suspend fun managementList(): NetResponse<ManagementListEntity>

    /**
     *健康管理详情
     */
    @POST("management/info")
    @FormUrlEncoded
    suspend fun managementInfo(@Field("parm") classify: String): NetResponse<ManagementInfoEntity>

}